<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Visual Studio Code常用插件 | 小李博客</title><meta name="keywords" content="工具"><meta name="author" content="小李博客"><meta name="copyright" content="小李博客"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="VS Code简介插件参考 || 官方插件库 || VSCode常用插件和技巧教程    vscode是微软开发的的一款代码编辑器，就如官网上说的一样，vscode重新定义（redefined）了代码编辑器。 当前市面上常用的轻型代码编辑器主要是：sublime，notepad++，editplus，atom这几种。 比起notepad++、editplus，vscode集成了许多IDE才具有的功">
<meta property="og:type" content="article">
<meta property="og:title" content="Visual Studio Code常用插件">
<meta property="og:url" content="http://xiaoliblog.cn/page/vscode.html">
<meta property="og:site_name" content="小李博客">
<meta property="og:description" content="VS Code简介插件参考 || 官方插件库 || VSCode常用插件和技巧教程    vscode是微软开发的的一款代码编辑器，就如官网上说的一样，vscode重新定义（redefined）了代码编辑器。 当前市面上常用的轻型代码编辑器主要是：sublime，notepad++，editplus，atom这几种。 比起notepad++、editplus，vscode集成了许多IDE才具有的功">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/lzyblog/image@main/2021/01/03/24ca35f9bc80d99b048196fa8b73b300.png">
<meta property="article:published_time" content="2021-01-03T12:56:04.182Z">
<meta property="article:modified_time" content="2021-03-28T03:31:27.622Z">
<meta property="article:author" content="小李博客">
<meta property="article:tag" content="工具">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://cdn.jsdelivr.net/gh/lzyblog/image@main/2021/01/03/24ca35f9bc80d99b048196fa8b73b300.png"><link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/xiaoliblog/image@6b5e7ef72be1c8973d94e5a9c49accbf775ad820/2021/02/01/c485da031fe0e464d04eaba8a66c4a8f.png"><link rel="canonical" href="http://xiaoliblog.cn/page/vscode"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/instantsearch.js@2.10.5/dist/instantsearch.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/instantsearch.js@2.10.5/dist/instantsearch.min.js" defer></script><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: {"appId":"RTG4CPNBLJ","apiKey":"f1745bdad68ceec57653b78244fe332c","indexName":"MyBlogIndex","hits":{"per_page":6},"languages":{"input_placeholder":"搜索文章","hits_empty":"找不到您查询的内容：${query}","hits_stats":"找到 ${hits} 条结果，用时 ${time} 毫秒"}},
  localSearch: undefined,
  translate: {"defaultEncoding":2,"translateDelay":0,"msgToTraditionalChinese":"繁","msgToSimplifiedChinese":"簡"},
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":200},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: {"limitCount":100,"languages":{"author":"作者: 小李博客","link":"链接: ","source":"来源: 小李博客","info":"著作权归作者所有。商业转载请联系作者获得授权，非商业转载请注明出处。"}},
  lightbox: 'mediumZoom',
  Snackbar: {"chs_to_cht":"你已切换为繁体","cht_to_chs":"你已切换为简体","day_to_night":"你已切换为深色模式","night_to_day":"你已切换为浅色模式","bgLight":"#49b1f5","bgDark":"#121212","position":"top-center"},
  source: {
    jQuery: 'https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js',
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
    },
    fancybox: {
      js: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js',
      css: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isanchor: true
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = { 
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2021-03-28 11:31:27'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const fontSizeVal = saveToLocal.get('global-font-size')
    if (fontSizeVal !== undefined) {
      document.documentElement.style.setProperty('--global-font-size', fontSizeVal + 'px')
    }
    })(window)</script><link rel="stylesheet" href="/css/MyStyle/MyStyle.css" media="defer" onload="this.media='all'"/><link rel="stylesheet" href="/css/MyStyle/tagStyle.css" media="defer" onload="this.media='all'"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/zykjofficial/zykjresource@master/css/font-awesome-animation.min.css" media="defer" onload="this.media='all'"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/sviptzk/StaticFile_HEXO@latest/butterfly/css/font-awesome-animation.min.css" media="defer" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/sviptzk/StaticFile_HEXO@latest/butterfly/css/plugins.min.css" media="defer" onload="this.media='all'"><meta name="generator" content="Hexo 5.2.0"><link rel="alternate" href="/atom.xml" title="小李博客" type="application/atom+xml">
</head><body><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="author-avatar"><img class="avatar-img" src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@6b5e7ef72be1c8973d94e5a9c49accbf775ad820/2021/02/01/c485da031fe0e464d04eaba8a66c4a8f.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/archives/"><div class="headline">文章</div><div class="length-num">210</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/tags/"><div class="headline">标签</div><div class="length-num">38</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/categories/"><div class="headline">分类</div><div class="length-num">56</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 主页</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/box/"><i class="fa-fw fa fa-briefcase"></i><span> 工具箱</span></a></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-book"></i><span> 找文章</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></li><li><a class="site-page child" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></li><li><a class="site-page child" href="/categories/"><i class="fa-fw fa fa-folder-open"></i><span> 分类</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fa fa-address-card"></i><span> 关于</span></a></div><div class="menus_item"><a class="site-page" href="/messageboard/"><i class="fa-fw fa fa-paper-plane"></i><span> 留言</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="not-top-img" id="page-header"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">小李博客</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 主页</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/box/"><i class="fa-fw fa fa-briefcase"></i><span> 工具箱</span></a></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-book"></i><span> 找文章</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></li><li><a class="site-page child" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></li><li><a class="site-page child" href="/categories/"><i class="fa-fw fa fa-folder-open"></i><span> 分类</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fa fa-address-card"></i><span> 关于</span></a></div><div class="menus_item"><a class="site-page" href="/messageboard/"><i class="fa-fw fa fa-paper-plane"></i><span> 留言</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav></header><main class="layout" id="content-inner"><div id="post"><div id="post-info"><h1 class="post-title">Visual Studio Code常用插件</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2021-01-03T12:56:04.182Z" title="发表于 2021-01-03 20:56:04">2021-01-03</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2021-03-28T03:31:27.622Z" title="更新于 2021-03-28 11:31:27">2021-03-28</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/%E5%B7%A5%E5%85%B7/">工具</a><i class="fas fa-angle-right post-meta-separator"></i><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/%E5%B7%A5%E5%85%B7/VsCode%E5%B8%B8%E7%94%A8%E6%8F%92%E4%BB%B6/">VsCode常用插件</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">2.7k</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>8分钟</span></span><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="Visual Studio Code常用插件"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"></span></span></div></div></div><article class="post-content" id="article-container"><h1 id="VS-Code简介"><a href="#VS-Code简介" class="headerlink" title="VS Code简介"></a>VS Code简介</h1><div class="note success simple"><p><a target="_blank" rel="noopener" href="https://blog.csdn.net/jiandan1127/article/details/85957003">插件参考</a> || <a target="_blank" rel="noopener" href="https://marketplace.visualstudio.com/vscode">官方插件库</a> || <a target="_blank" rel="noopener" href="https://www.jspang.com/detailed?id=60">VSCode常用插件和技巧教程</a></p>
</div>

<ul>
<li>vscode是微软开发的的一款代码编辑器，就如官网上说的一样，vscode重新定义（redefined）了代码编辑器。</li>
<li>当前市面上常用的轻型代码编辑器主要是：sublime，notepad++，editplus，atom这几种。</li>
<li>比起notepad++、editplus，vscode集成了许多IDE才具有的功能，比起它们更像一个代码编辑器；</li>
<li>比起sublime，vscode颜值更高，安装配置插件更为方便；</li>
<li>比起atom，vscode启动速度更快，打开各种大文件不卡。</li>
<li>可以说，vscode既拥有高自由度、又拥有高性能和高颜值，最关键的是，vscode还是一款免费并且有团队持续快速更新的代码编辑器。</li>
<li>可以说，vscode是代码编辑器的首选。个人推荐编写前端代码时，代码编辑器选择vscode，IDE选择WebStorm。</li>
<li>vscode安装插件只需要点击图片所示按钮，即可进入拓展，在搜索框中输入插件名点击安装后，等待安装好即可点击重新加载重启vscode使得插件生效。</li>
</ul>
<img src="https://cdn.jsdelivr.net/gh/lzyblog/image@main/2021/01/03/04ceb29a4b5e3ac627e7a3fd46ed1ea2.png" width="50%">

<ul>
<li>当你不需要某个插件时只需要进入扩展，点击对应插件右下角的齿轮按钮即可选择禁用或卸载该插件。</li>
</ul>
<img src="https://cdn.jsdelivr.net/gh/lzyblog/image@main/2021/01/03/f954917f8d5d2ea692e44a4ffcb5f11f.png" width="50%">

<h1 id="下载VS-Code"><a href="#下载VS-Code" class="headerlink" title="下载VS Code"></a>下载VS Code</h1><div class="note success simple"><p>👉<a target="_blank" rel="noopener" href="https://wws.lanzous.com/ibPKpklkb6d">蓝奏云下载密码：8ogy</a></p>
</div>

<h1 id="安装中文包"><a href="#安装中文包" class="headerlink" title="安装中文包"></a>安装中文包</h1><ul>
<li>Windows系统下按快捷键：<code>ctrl+shift+p</code>打开命令面板，界面如下</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/lzyblog/image@main/2021/01/03/b17a6e6d94e172b057265fd158ad7a42.png"></p>
<ul>
<li>在输入框中输入：Configure Display Language   （若是中文模式下，要切换其他语言，则输入：配置语言）。回车。</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/lzyblog/image@main/2021/01/03/4028ebbd9e95c520d7f91792ae0a7052.png"></p>
<ul>
<li>vscode会为你打开一个json文件，长下面这样——</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/lzyblog/image@main/2021/01/03/d4980d3a687f4ca5bfe8c940d89bbae7.png"><br>把其中的 “locale”:”” 改成图上的 “locale”:”zh-CN” ,再重启vscode，界面语言就会是中文了</p>
<div class="note warning simple"><p>注意：若重启后语言没有改变，可能是你没有下载适用于 VSCode 的中文（简体）语言包，链接如下：<br><a target="_blank" rel="noopener" href="https://marketplace.visualstudio.com/items?itemName=MS-CEINTL.vscode-language-pack-zh-hans">Chinese (Simplified) Language Pack for Visual Studio Code - Visual Studio Marketplace</a></p>
</div>

<h1 id="配置语言环境"><a href="#配置语言环境" class="headerlink" title="配置语言环境"></a>配置语言环境</h1><ul>
<li>Windows系统下按快捷键：<code>ctrl+shift+p</code>打开命令面板，输入<code>Change Language Mode</code>，界面如下</li>
</ul>
<img src="https://cdn.jsdelivr.net/gh/lzyblog/image@main/2021/01/03/d5dc6d73a28ba38774345379d58e21ed.png" width="80%">

<ul>
<li>找到HTML语言，回车后，在第一行打下感叹号，确定光标在感叹号的后面，之后按下tab键或者enter键都可以，就会生成html的基本语法</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/lzyblog/image@main/2021/01/03/99d2700b2890383675dbe002eec330f2.png"></p>
<h1 id="功能插件"><a href="#功能插件" class="headerlink" title="功能插件"></a>功能插件</h1><h2 id="Open-in-browser插件"><a href="#Open-in-browser插件" class="headerlink" title="Open in browser插件"></a>Open in browser插件</h2><ul>
<li>Visual Studio Code默认是在VScode的控制台下查看html页面，这对于我们调试和查看效果十分不方便。所以这里我们需要安装一下扩展插件，在浏览器中查看html页面。</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/lzyblog/image@main/2021/01/03/669dca3f37dec0ab934fe6c00f904178.png"></p>
<ul>
<li>安装完成后，选择你要在浏览器打开的HTML页面，按快捷键Alt + B 就可以在默认浏览器下打开你写的页面了</li>
<li>使用快捷键 Shift + Alt + B 可以选择其他浏览器打开。</li>
<li>或者对想要运行的HTML页面处右击选择open in default browse，也可以选择open in other browse，自己选择浏览器即可</li>
</ul>
<img src="https://cdn.jsdelivr.net/gh/lzyblog/image@main/2021/01/03/45f88afaebb22b168cbc1986e801a3c6.png" width="60%" height="50%">


<h2 id="Live-Server插件"><a href="#Live-Server插件" class="headerlink" title="Live Server插件"></a>Live Server插件</h2><ul>
<li>首先，vscode本身没有新建项目的选项，所以要先创建一个空的文件夹喔。</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/lzyblog/image@main/2021/01/03/1a9892a5d3cc3bc8f7d18564ccea234e.png"></p>
<ul>
<li>然后打开vscode，再在vscode里面打开文件夹，这样才可以创建项目。</li>
<li>导入VScode后，需要配置一下，Ctrl+shift+p，然后输入task，点击第一个选项即可配置。</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/lzyblog/image@main/2021/01/03/937b36b7904607aa525b02f92e34e7c4.png"></p>
<ul>
<li>跳转后，再次选择other……即可自动生成配置文件喔。</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/lzyblog/image@main/2021/01/03/ec579099ee5b7d3aa2b5292440656939.png"></p>
<ul>
<li>安装Live Server插件</li>
<li>新建一个工作区（也可以直接拖一个文件夹到vscode中），注意单独新建一个HTML文件拖动到IDE中是使用不了Live Server的，需要把这个HTML文件放到创建的工作区(文件夹)中，新建完成后我们可以在状态栏上看到一个Go Live，单击会自动打开浏览器并显示</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/lzyblog/image@main/2021/01/03/96274be288f42fad34b04e5c65d152ef.png"></p>
<ul>
<li>如果没有状态栏上，也可以在文件上单击右键，选择Open With Live Server这一项</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/lzyblog/image@main/2021/01/03/01e4e609a8ea5ef0f522775253f9ecbd.png"></p>
<ul>
<li>这样就可以在一个工程项目文件夹开发，并能实时预览</li>
</ul>
<h2 id="Markdown插件"><a href="#Markdown插件" class="headerlink" title="Markdown插件"></a>Markdown插件</h2><ul>
<li>vscode默认是支持Markdown的，但是我们还是需要一些额外的插件来辅助。如前文安装中文包一般，到vscode的插件市场中，搜索Markdown关键字，安装这几个插件——</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/lzyblog/image@main/2021/01/03/c862a93eb09493e70f78e980b4371aef.png"><br><img src="https://cdn.jsdelivr.net/gh/lzyblog/image@main/2021/01/03/55ecaf1984552cc8deecbd8c226ff354.png"></p>
<ul>
<li>第一个插件，是一个组合包，一股脑把最常用的Markdown优化都给你装好；</li>
<li>第二个插件，则是Github使用的Markdown渲染样式，不是特别华丽，很朴素，很简洁的样式，因为很多人用Markdown都是为了使用Github Pages，所以这个样式特别受欢迎。使用这个样式，在本地就能预览Markdown文件最终在Github Pages中显示的效果。</li>
<li>为了集中管理用Markdown的文档，你可以在你容易找到的地方，专门建立一个文件夹，这取决于大家使用电脑的习惯，每个人都不一样。使用vscode打开这个文件夹，你会在左侧的导航窗口里，看到这样的显示——</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/lzyblog/image@main/2021/01/03/8310a67ce6633860faf6d25716f99446.png"></p>
<ul>
<li>点击右上角的这个图标——</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/lzyblog/image@main/2021/01/03/547ea8cfbfb0e4ab8941f53461887c8d.png"><br>然后你的页面就会变成两栏分列的样子；右侧这一栏就是markdown文件被渲染为HTML的预览；由于我们安装了Github的渲染风格，所以这里会按照Github的样式来渲染你的markdown文件。<br><img src="https://cdn.jsdelivr.net/gh/lzyblog/image@main/2021/01/03/8c7fddac5fb0740a23e66419f59b057f.png"></p>
<h2 id="Auto-Rename-Tag"><a href="#Auto-Rename-Tag" class="headerlink" title="Auto Rename Tag"></a>Auto Rename Tag</h2><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@10a959a0229fdffc6a73d64add6a8e1849ef8305/2021/03/07/1df36aa6adf4d7e8ae64e6df30767d9a.png" width="70%">

<ul>
<li>AutoRename Tag是一款面向Web开发人员的VSCode扩展。顾名思义，Auto Rename Tag可以在一个标签更改时自动更新另一个标签</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@6ba65a7070beb9d66a9759e071045fdd9d9d83ca/2021/03/07/ceb43093c241c7c54df3c44301d1cf76.png"></p>
<h2 id="Snippets"><a href="#Snippets" class="headerlink" title="Snippets"></a>Snippets</h2><ul>
<li>Snippets 是节约时间提高生产力的最好办法。这并不是单单某一个语言的扩展，而是多种语言的各种扩展。</li>
<li>下面是一些流行的 Snippets  扩展：<ul>
<li><code>Angular Snippts (version 11)</code></li>
<li><code>Python</code></li>
<li><code>JavaScript (ES6) code snippets</code></li>
<li><code>HTML Snippets</code></li>
<li><code>ES7 React/Redux/GraphQL/React-Native snippets</code></li>
<li><code>Vue 3 Snippets</code></li>
<li><code>jQuery Code Snippets</code></li>
</ul>
</li>
<li>例如，在React中创建新组建时，输入函数式组件的语法非常繁琐。使用ES7React/Redux/GraphQL/React-Native snippets扩展，只需要输入rfc并按回车即可创建函数式组件</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@8bd57ad79be4f35d1e3eba7fca3161c96e7fdbe6/2021/03/07/2384500ee17d652bc2d98e36ce53d5fc.png"></p>
<h2 id="px-to-rem-amp-rpx-cssrem"><a href="#px-to-rem-amp-rpx-cssrem" class="headerlink" title="px to rem &amp; rpx (cssrem)"></a>px to rem &amp; rpx (cssrem)</h2><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@118f286144828b36a2be669398d17972f4822d2d/2021/03/07/036688875a6b27671723566a9453d50e.png" width="70%">

<ul>
<li>一款px转rem的插件</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@15e021cab9566f72572a3d0a655e6595f0f62deb/2021/03/07/f90b32a4c48d539e47e6bb167a7146dc.png"></p>
<h2 id="Better-Comments"><a href="#Better-Comments" class="headerlink" title="Better Comments"></a>Better Comments</h2><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@cddc2effe72bcaa0714d171b5bfee17bac2a8d47/2021/03/07/4778e3daf686fd786c342063c0e27a91.png" width="70%">

<ul>
<li>使用Better Comments扩展，可以将注释分为警告、询问、待办、重点等几大类，并提供注释高亮效果</li>
<li>在<code>\\</code>或者<code>&lt;!--</code>后面使用下述字符做标记：<ul>
<li><code>*</code> 表示重点</li>
<li><code>!</code> 表示错误和警告</li>
<li><code>?</code> 表示询问和问题</li>
<li><code>//</code> 表示删除</li>
<li><code>TODO</code>表示待办事项</li>
</ul>
</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@d3106276d4da036943f3ad56dc2ab5646708a317/2021/03/07/5dea18039f6a68fb8bbb9b96117db7cf.png"></p>
<ul>
<li>也可以自己定义属于自己的颜色。方法如下：<ul>
<li>点击插件上的小齿轮，选择<code>Extension Setting</code>.</li>
<li>点击<code>Edit in setting.json</code>选项，点击后打开了<code>settings.json</code></li>
<li>可以根据自己的喜好自定义了</li>
<li>也可以增加新的注释颜色到<code>setting.json</code>中</li>
</ul>
</li>
</ul>
<h2 id="Import-Cost"><a href="#Import-Cost" class="headerlink" title="Import Cost"></a>Import Cost</h2><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@8d9e8e17ad9c3c4f51823d247d247fd6f6f31cfb/2021/03/07/3e7ba370d00d761176a5f3a469f12e4a.png" width="70%">

<ul>
<li>Import cost可以在代码中显示导入的估计大小。编写项目时，很重要的一点就是不要导入过大的软件包，以免损害用户体验。避免导入过大软件包的方法之一就是随时跟踪软件包的大小。</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@ef64e17398c1f1bcfcbeeb8ddfd828d355146cd1/2021/03/07/7cd21b9dc815e6c4d99161571d64fff9.png"></p>
<ul>
<li>如果导入过大，Import Cost就会用红色显示大小，以示警告。你可以自行配置小、中、大分别对应的大小。</li>
</ul>
<h2 id="GitLens"><a href="#GitLens" class="headerlink" title="GitLens"></a>GitLens</h2><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@61e21d185bda2f7354a00abf09e1329b6e3a6ab6/2021/03/07/c24efdbccc9b4f58fafb73e8a63059c6.png" width="70%">

<ul>
<li>GitLens是一款开源扩展。它给VSCode添加了Git的功能<ul>
<li>能通过Git blame和code lens的功能，将代码的作者可视化</li>
<li>遍历某个文件的历史版本</li>
<li>在行尾显示当前行的作者信息，而不会对工作造成干扰</li>
<li>自定义状态栏，显示当前行的上次修改者和修改日期</li>
</ul>
</li>
</ul>
<h2 id="Prettier"><a href="#Prettier" class="headerlink" title="Prettier"></a>Prettier</h2><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@1ea9262d55f26eb8bea75ca10795474c137cc787/2021/03/07/86d19a78b2535527a965616f07a61988.png" width="70%">

<ul>
<li>格式化JavaScript / TypeScript / CSS </li>
<li>Prettier安装成功后，编辑器默认的格式化处理就会被prettier代替， 默认快捷键是<code>alt + shift + f</code></li>
</ul>
<h2 id="Polacode"><a href="#Polacode" class="headerlink" title="Polacode"></a>Polacode</h2><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@a72daa6b9c2fe2d4deaf2735c3cf7aa9b96f650a/2021/03/07/fdfe3dbd2e8f04f8c7365b8286c359d5.png" width="70%">

<ul>
<li>快速生成漂亮的代码截图</li>
<li>安装完成后，先打开你要分享的代码，然后按<code>Ctrl + Shift + p</code> 打开命令面板,然后再输入框中输入<code>Polacode</code>,就可以打开使用了，可以设置阴影、透明度，然后点击圆形图标即可截图保存</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@a0a0e6d834dc4253d31098c19b99158606b2ad44/2021/03/07/e49441a55f91d56e6dbb4748943a5cdd.png"></p>
<h2 id="其他插件"><a href="#其他插件" class="headerlink" title="其他插件"></a>其他插件</h2><ul>
<li>JavaScript Booster<br>  提高JavaScript代码专业度，插件会帮助你在你写的不合理的地方显示黄色感叹号，单击黄色感叹号后，就会跟我们变成更好的代码</li>
<li>Code Spell Checker<br>  拼写检查器。比如 banana 单词写错成 banane ，会提示你是否修改成 banana ，也可以将 banane 添加至检查器的字典中。</li>
<li>Path Intellisense<br>  自动完成文件名</li>
<li>Trailing Spaces<br>  突出显示尾随空格，让你的“空格”型强迫症 显示呈现。</li>
<li>Code Runner<br>  这个插件可以直接运行所选中的代码。</li>
<li>A-super-translate<br>  划词翻译。鼠标停留选中几秒就会查看翻译内容</li>
<li>filesize<br>  在状态栏中显示当前文件大小</li>
<li>TabNine<br>  Al辅助代码补全神器。可以根据你写过的代码习惯，来给你匹配合适的字段</li>
<li>Error Lens<br>  将编辑器诊断出的警告、错误、语法问题（提示的波浪线）等，以用颜色填充行背景的方式突出提示，并将诊断信息显示在尾部</li>
</ul>
<h1 id="美化插件"><a href="#美化插件" class="headerlink" title="美化插件"></a>美化插件</h1><h2 id="Fira-code字体"><a href="#Fira-code字体" class="headerlink" title="Fira code字体"></a>Fira code字体</h2><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@d2ed5e7b4cccdc030afdfba7d2027277acb31594/2021/03/13/0b656d20bd4bf12d5e99ce81a243128a.png" width="70%">

<ul>
<li>GitHub上下载字体：<a target="_blank" rel="noopener" href="https://github.com/tonsky/FiraCode">https://github.com/tonsky/FiraCode</a>，在<a target="_blank" rel="noopener" href="https://github.com/tonsky/FiraCode/blob/master/README.md">README.md</a>中往下翻页，会看到download链接（如下图）</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@935174600411d98f245c355c0820df79a29d5ea5/2021/03/13/6b242505a6230216749db9f88e2ed291.png"></p>
<div class="note success simple"><p>如果访问GitHUb太慢，可以从我的蓝奏云链接直接下载👉<a target="_blank" rel="noopener" href="https://wws.lanzous.com/iWY3Omw54dg">密码:696f</a></p>
</div>

<ul>
<li>打开压缩包，进入<code>Fira_Code_v5.2\ttf</code>文件夹, 选中所有字体，右键选择【为所有用户安装】</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@9895bcedb3d90e44d9a6c01118e2815d49164026/2021/03/13/956e1eed32f1ba7122bb7b5ed8ced680.png"></p>
<ul>
<li>打开【<code>控制面板\所有控制面板项\字体\Fira Code</code>】，可以查看是否安装成功</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@aa84d46c7168ddf590921702c6896f8a38a674a3/2021/03/13/dce41154558518c6c9dc720edb0a32ea.png"></p>
<ul>
<li>【文件】-【首选项】-【设置】，搜索<code>font</code>，并在<code>settings.json</code>打开</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@0237465121abb60912cfc0023d21af932b7eea2e/2021/03/13/fe05d822e83b3eb2052fc57211eddb33.png"></p>
<ul>
<li>修改或添加如下代码，注意用逗号分隔：</li>
</ul>
<figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">&quot;editor.fontFamily&quot;: &quot;Fira Code&quot;, //后边的引号中写上要设置的字体类型，个人比较喜欢Fira Code</span><br><span class="line">&quot;editor.fontLigatures&quot;: true, //这个控制是否启用字体连字，true启用，false不启用，这里选择启用</span><br><span class="line">&quot;editor.fontSize&quot;: 14, //设置字体大小，这个不多说都明白</span><br><span class="line">&quot;editor.fontWeight&quot;: &quot;normal&quot; //这个设置字体粗细，可选normal,bold,&quot;100&quot;~&quot;900&quot;等，选择合适的就行</span><br></pre></td></tr></table></figure>
<p><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@10b451149b4473d1d6420786fb486538e8c1c2c9/2021/03/13/263f19f4512d76f45631c998753d1cb0.png"></p>
<div class="note success simple"><p>推荐另一款字体<code>JetBrains Mono</code>：<a target="_blank" rel="noopener" href="https://www.jetbrains.com/lp/mono/">https://www.jetbrains.com/lp/mono/</a></p>
</div>

<h2 id="Bracket-Pair-Colorizer"><a href="#Bracket-Pair-Colorizer" class="headerlink" title="Bracket Pair Colorizer"></a>Bracket Pair Colorizer</h2><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@2c72fb362116e7cbf052750df51286b31bf4dc52/2021/03/07/350ac7c1c22937a38a51df2f57b3eece.png" width="70%">

<ul>
<li>这款扩展可以将匹配的括号染成相同的颜色。同一个文件内嵌套的组件、函数、对象等带来的大量括号很容易让人摸不着头脑</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@655a904c5726d90bda6088c46bb001376fc09160/2021/03/07/3f1f8f424f0205e1c0d7216acccacff9.png"></p>
<h2 id="Icons"><a href="#Icons" class="headerlink" title="Icons"></a>Icons</h2><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@59e5af5bc159aab9177e14f845171893b99ab32c/2021/03/07/ee125bc35ddf09e19eeecd9d954702f5.png" width="70%">

<ul>
<li>描述性的图标可以帮你区分不同的文件和文件夹。图标也让开发过程更有趣。</li>
<li>下面是两个VSCode标签页的比较。一个有图标，另一个没有。</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@cc01c564e91dfc19153e3e818cc4cbe79372ce67/2021/03/07/51738e0b47581f9f09da8b4e0243e68c.png"></p>
<ul>
<li>有许多图标扩展可供选择。流行的图标扩展有：<ul>
<li><code>vscode-icons</code></li>
<li><code>Material Icon Theme</code></li>
<li><code>Material Theme Icons</code></li>
<li><code>Simple icons</code></li>
</ul>
</li>
</ul>
<h2 id="Indent-Rainbow"><a href="#Indent-Rainbow" class="headerlink" title="Indent-Rainbow"></a>Indent-Rainbow</h2><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@f59564bdb5e9e6835d8c34631e3155973cfd5c52/2021/03/07/40139c436409e4cf4d5e832a0d604641.png" width="70%">

<ul>
<li>可以让让缩进带有颜色</li>
</ul>
<p><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@b14ecd71fd0821718ccdf08d1f9a24e6650b0047/2021/03/07/d0f84e5d15a25bcb0fc857693366291e.png"></p>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="mailto:undefined">xiaoliblog</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://xiaoliblog.cn">https://xiaoliblog.cn</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="http://xiaoliblog.cn" target="_blank">小李博客</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/%E5%B7%A5%E5%85%B7/">工具</a></div><div class="post_share"><div class="social-share" data-image="https://cdn.jsdelivr.net/gh/lzyblog/image@main/2021/01/03/24ca35f9bc80d99b048196fa8b73b300.png" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/social-share.js/dist/js/social-share.min.js" defer></script></div></div><div class="post-reward"><div class="reward-button button--animated"><i class="fas fa-qrcode"></i> 打赏</div><div class="reward-main"><ul class="reward-all"><li class="reward-item"><a href="/img/wechat.png" target="_blank"><img class="post-qr-code-img" src="/img/wechat.png" alt="微信"/></a><div class="post-qr-code-desc">微信</div></li><li class="reward-item"><a href="/img/alipay.png" target="_blank"><img class="post-qr-code-img" src="/img/alipay.png" alt="支付宝"/></a><div class="post-qr-code-desc">支付宝</div></li></ul></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/page/java01.html"><img class="prev-cover" src="https://cdn.jsdelivr.net/gh/lzyblog/image@main/2020/12/30/0b4418a37c4d8fd66e1607c74793c6be.png" onerror="onerror=null;src='https://cdn.jsdelivr.net/gh/lzyblog/image@main/2020/11/19/bd16b394f7359083b1f6072a67e3f968.png'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">Java👉核心基础</div></div></a></div><div class="next-post pull-right"><a href="/page/JavaMail.html"><img class="next-cover" src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@49db1e1882ba97dcb3a0c2be5a580006f80f1f4f/2021/01/24/7309dc108232cf99fd79b144f350f4f5.png" onerror="onerror=null;src='https://cdn.jsdelivr.net/gh/lzyblog/image@main/2020/11/19/bd16b394f7359083b1f6072a67e3f968.png'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">JavaMail📪邮件接发技术</div></div></a></div></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span> 相关推荐</span></div><div class="relatedPosts-list"><div><a href="/page/computer.html" title="换机软件及开发环境备忘手册"><img class="cover" src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@e72b6ce51e3fd88307f7f12e487747020bfb921c/2021/04/22/c02b2a29dd05fac30303d16e44d39c65.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2020-12-04</div><div class="title">换机软件及开发环境备忘手册</div></div></a></div></div></div><hr/><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> 评论</span></div></div><div class="comment-wrap"><div><div id="twikoo-wrap"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="card-info-avatar is-center"><img class="avatar-img" src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@6b5e7ef72be1c8973d94e5a9c49accbf775ad820/2021/02/01/c485da031fe0e464d04eaba8a66c4a8f.png" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/><div class="author-info__name">小李博客</div><div class="author-info__description">越努力，越幸运！</div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">210</div></a></div><div class="card-info-data-item is-center"><a href="/tags/"><div class="headline">标签</div><div class="length-num">38</div></a></div><div class="card-info-data-item is-center"><a href="/categories/"><div class="headline">分类</div><div class="length-num">56</div></a></div></div><a class="button--animated" id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/xiaoliblog"><i class="fab fa-github"></i><span>博主的GitHub首页</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://gitee.com/xiaoliblog" target="_blank" title="Gitee"><i class="iconfont icon-gitee card_icon_gitee"></i></a><a class="social-icon" href="https://space.bilibili.com/390969485" target="_blank" title="BiliBili"><i class="iconfont icon-bilibili card_icon_bilibili"></i></a><a class="social-icon" href="http://wpa.qq.com/msgrd?v=3&amp;uin=2312057536&amp;site=CSDN&amp;menu=yes" target="_blank" title="QQ"><i class="iconfont icon-qq card_icon_qq"></i></a><a class="social-icon" href="https://github.com/xiaoliblog" target="_blank" title="GitHub"><i class="iconfont icon-git card_icon_git"></i></a><a class="social-icon" href="https://blog.csdn.net/qq_43266250?spm=1010.2135.3001.5113" target="_blank" title="CSDN"><i class="iconfont icon-csdn card_icon_csdn"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div><div class="announcement_content">正在考研备考中💦</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#VS-Code%E7%AE%80%E4%BB%8B"><span class="toc-number">1.</span> <span class="toc-text">VS Code简介</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E4%B8%8B%E8%BD%BDVS-Code"><span class="toc-number">2.</span> <span class="toc-text">下载VS Code</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%AE%89%E8%A3%85%E4%B8%AD%E6%96%87%E5%8C%85"><span class="toc-number">3.</span> <span class="toc-text">安装中文包</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E9%85%8D%E7%BD%AE%E8%AF%AD%E8%A8%80%E7%8E%AF%E5%A2%83"><span class="toc-number">4.</span> <span class="toc-text">配置语言环境</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%8A%9F%E8%83%BD%E6%8F%92%E4%BB%B6"><span class="toc-number">5.</span> <span class="toc-text">功能插件</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#Open-in-browser%E6%8F%92%E4%BB%B6"><span class="toc-number">5.1.</span> <span class="toc-text">Open in browser插件</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Live-Server%E6%8F%92%E4%BB%B6"><span class="toc-number">5.2.</span> <span class="toc-text">Live Server插件</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Markdown%E6%8F%92%E4%BB%B6"><span class="toc-number">5.3.</span> <span class="toc-text">Markdown插件</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Auto-Rename-Tag"><span class="toc-number">5.4.</span> <span class="toc-text">Auto Rename Tag</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Snippets"><span class="toc-number">5.5.</span> <span class="toc-text">Snippets</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#px-to-rem-amp-rpx-cssrem"><span class="toc-number">5.6.</span> <span class="toc-text">px to rem &amp; rpx (cssrem)</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Better-Comments"><span class="toc-number">5.7.</span> <span class="toc-text">Better Comments</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Import-Cost"><span class="toc-number">5.8.</span> <span class="toc-text">Import Cost</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#GitLens"><span class="toc-number">5.9.</span> <span class="toc-text">GitLens</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Prettier"><span class="toc-number">5.10.</span> <span class="toc-text">Prettier</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Polacode"><span class="toc-number">5.11.</span> <span class="toc-text">Polacode</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%85%B6%E4%BB%96%E6%8F%92%E4%BB%B6"><span class="toc-number">5.12.</span> <span class="toc-text">其他插件</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E7%BE%8E%E5%8C%96%E6%8F%92%E4%BB%B6"><span class="toc-number">6.</span> <span class="toc-text">美化插件</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#Fira-code%E5%AD%97%E4%BD%93"><span class="toc-number">6.1.</span> <span class="toc-text">Fira code字体</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Bracket-Pair-Colorizer"><span class="toc-number">6.2.</span> <span class="toc-text">Bracket Pair Colorizer</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Icons"><span class="toc-number">6.3.</span> <span class="toc-text">Icons</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Indent-Rainbow"><span class="toc-number">6.4.</span> <span class="toc-text">Indent-Rainbow</span></a></li></ol></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/page/project01.html" title="前端实例🥳响应式网站首页"><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@c19917500ab083c77c7613263ba7ee74d5a08ae6/2021/04/30/469f30b141d73fa0fc4c962662d5813f.png" onerror="this.onerror=null;this.src='https://cdn.jsdelivr.net/gh/lzyblog/image@main/2020/11/19/bd16b394f7359083b1f6072a67e3f968.png'" alt="前端实例🥳响应式网站首页"/></a><div class="content"><a class="title" href="/page/project01.html" title="前端实例🥳响应式网站首页">前端实例🥳响应式网站首页</a><time datetime="2021-04-30T11:50:53.094Z" title="发表于 2021-04-30 19:50:53">2021-04-30</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/page/WeChatpay.html" title="微信支付对接"><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@f2f670b92ea149650ffa7834354fc90284f2f44a/2021/04/29/5bdc9b381a06193d27cf2fb7c2fb608a.png" onerror="this.onerror=null;this.src='https://cdn.jsdelivr.net/gh/lzyblog/image@main/2020/11/19/bd16b394f7359083b1f6072a67e3f968.png'" alt="微信支付对接"/></a><div class="content"><a class="title" href="/page/WeChatpay.html" title="微信支付对接">微信支付对接</a><time datetime="2021-04-29T12:20:48.070Z" title="发表于 2021-04-29 20:20:48">2021-04-29</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/page/Alipay.html" title="支付宝支付对接"><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@61a9b6a6e09e4bda38bb08e3104b717885beaee5/2021/04/29/c3fa51f9cf14e90d9e5a7aa8814dd041.png" onerror="this.onerror=null;this.src='https://cdn.jsdelivr.net/gh/lzyblog/image@main/2020/11/19/bd16b394f7359083b1f6072a67e3f968.png'" alt="支付宝支付对接"/></a><div class="content"><a class="title" href="/page/Alipay.html" title="支付宝支付对接">支付宝支付对接</a><time datetime="2021-04-27T16:00:00.000Z" title="发表于 2021-04-28 00:00:00">2021-04-28</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/page/Vuejs11.html" title="Vue.js前端框架🎯Pagination+PageHelper实现分页"><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@61bf4245f6d84d2d0f66d163b89c916788cc1845/2021/04/13/ec6b232f8fe5a840e4bd8c3eabcf49b2.png" onerror="this.onerror=null;this.src='https://cdn.jsdelivr.net/gh/lzyblog/image@main/2020/11/19/bd16b394f7359083b1f6072a67e3f968.png'" alt="Vue.js前端框架🎯Pagination+PageHelper实现分页"/></a><div class="content"><a class="title" href="/page/Vuejs11.html" title="Vue.js前端框架🎯Pagination+PageHelper实现分页">Vue.js前端框架🎯Pagination+PageHelper实现分页</a><time datetime="2021-04-26T14:48:39.701Z" title="发表于 2021-04-26 22:48:39">2021-04-26</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/page/Vuejs10.html" title="Vue.js前端框架🎯Vue-Element-admin模版"><img src="https://cdn.jsdelivr.net/gh/xiaoliblog/image@61bf4245f6d84d2d0f66d163b89c916788cc1845/2021/04/13/ec6b232f8fe5a840e4bd8c3eabcf49b2.png" onerror="this.onerror=null;this.src='https://cdn.jsdelivr.net/gh/lzyblog/image@main/2020/11/19/bd16b394f7359083b1f6072a67e3f968.png'" alt="Vue.js前端框架🎯Vue-Element-admin模版"/></a><div class="content"><a class="title" href="/page/Vuejs10.html" title="Vue.js前端框架🎯Vue-Element-admin模版">Vue.js前端框架🎯Vue-Element-admin模版</a><time datetime="2021-04-19T16:00:00.000Z" title="发表于 2021-04-20 00:00:00">2021-04-20</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2021 By 小李博客</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">🎯Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">🎉Butterfly</a></div><div class="footer_custom_text"><span><a style="margin-inline:5px" target="_blank" href="https://hexo.io/"><img src="https://img.shields.io/badge/Frame-Hexo-blue?style=flat&logo=hexo" title="博客框架为Hexo"></a><a style="margin-inline:5px" target="_blank" href="https://butterfly.js.org/"><img src="https://img.shields.io/badge/Theme-Butterfly-6513df?style=flat&logo=bitdefender" title="主题采用butterfly"></a><a style="margin-inline:5px" target="_blank" href="https://www.jsdelivr.com/"><img src="https://img.shields.io/badge/CDN-jsDelivr-orange?style=flat&logo=jsDelivr" title="本站使用JsDelivr为静态资源提供CDN加速"></a><a style="margin-inline:5px" target="_blank" href="https://vercel.com/ "><img src="https://img.shields.io/badge/Hosted-Vercel-brightgreen?style=flat&logo=Vercel" title="本站采用双线部署，默认线路托管于Vercel"></a><a style="margin-inline:5px" target="_blank" href="https://coding.net/ "><img src="https://img.shields.io/badge/Hosted-Coding-0cedbe?style=flat&logo=Codio" title="本站采用双线部署，联通线路托管于Coding"></a><a style="margin-inline:5px" target="_blank" href="https://github.com/"><img src="https://img.shields.io/badge/Source-Github-d021d6?style=flat&logo=GitHub" title="本站项目由Gtihub托管"></a><a style="margin-inline:5px" target="_blank" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img src="https://img.shields.io/badge/Copyright-BY--NC--SA%204.0-d42328?style=flat&logo=Claris" title="本站采用知识共享署名-非商业性使用-相同方式共享4.0国际许可协议进行许可"></a></span></div><div class="icp"><a target="_blank" rel="noopener" href="https://beian.miit.gov.cn/"><img class="icp-icon" src="/img/icp.png" alt="ICP"/><span>湘ICP备2021002541号</span></a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="font-plus" type="button" title="放大字体"><i class="fas fa-plus"></i></button><button id="font-minus" type="button" title="缩小字体"><i class="fas fa-minus"></i></button><button id="translateLink" type="button" title="简繁转换">繁</button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="chat_btn" type="button" title="rightside.chat_btn"><i class="fas fa-sms"></i></button><a id="to_comment" href="#post-comment" title="直达评论"><i class="fas fa-comments"></i></a><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="algolia-search"><div class="search-dialog"><div class="search-dialog__title" id="algolia-search-title">Algolia</div><div id="algolia-input-panel"><div id="algolia-search-input"></div></div><hr/><div id="algolia-search-results"><div id="algolia-hits"></div><div id="algolia-pagination"></div><div id="algolia-stats"></div></div><span class="search-close-button"><i class="fas fa-times"></i></span></div><div id="search-mask"></div></div><div><script src="/js/utils.js"></script><script src="https://cdn.jsdelivr.net/npm/vue@2.6.11"></script><script src="/js/main.js"></script><script defer src="/js/tw_cn.js"></script><script defer src="https://cdn.jsdelivr.net/npm/medium-zoom/dist/medium-zoom.min.js"></script><script src="https://cdn.jsdelivr.net/npm/instant.page/instantpage.min.js" type="module" defer></script><script defer src="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.js"></script><script defer src="/js/search/algolia.js"></script><div class="js-pjax"><script>if (!window.MathJax) {
  window.MathJax = {
    loader: {
      source: {
        '[tex]/amsCd': '[tex]/amscd'
      }
    },
    tex: {
      inlineMath: [ ['$','$'], ["\\(","\\)"]],
      tags: 'ams'
    },
    options: {
      renderActions: {
        findScript: [10, doc => {
          for (const node of document.querySelectorAll('script[type^="math/tex"]')) {
            const display = !!node.type.match(/; *mode=display/)
            const math = new doc.options.MathItem(node.textContent, doc.inputJax[0], display)
            const text = document.createTextNode('')
            node.parentNode.replaceChild(text, node)
            math.start = {node: text, delim: '', n: 0}
            math.end = {node: text, delim: '', n: 0}
            doc.math.push(math)
          }
        }, ''],
        addClass: [200,() => {
          document.querySelectorAll('mjx-container:not([display=\'true\']').forEach( node => {
            const target = node.parentNode
            if (!target.classList.contains('has-jax')) {
              target.classList.add('mathjax-overflow')
            }
          })
        }, '', false]
      }
    }
  }
  
  const script = document.createElement('script')
  script.src = 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js'
  script.id = 'MathJax-script'
  script.async = true
  document.head.appendChild(script)
} else {
  MathJax.startup.document.state(0)
  MathJax.texReset()
  MathJax.typeset()
}</script><script>if (document.getElementsByClassName('mermaid').length) {
  if (window.mermaidJsLoad) mermaid.init()
  else {
    getScript('https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js').then(() => {
      window.mermaidJsLoad = true
      mermaid.initialize({
        theme: 'default',
      })
      false && mermaid.init()
    })
  }
}</script><script>(()=>{
  const $countDom = document.getElementById('twikoo-count')
  const init = () => {
    twikoo.init(Object.assign({
      el: '#twikoo-wrap',
      envId: 'xiaoliblog-8gj3j5045d5b0896',
      region: ''
    }, null))
  }

  const getCount = () => {
    twikoo.getCommentsCount({
      envId: 'xiaoliblog-8gj3j5045d5b0896',
      region: '',
      urls: [window.location.pathname],
      includeReply: false
    }).then(function (res) {
      $countDom.innerText = res[0].count
    }).catch(function (err) {
      console.error(err);
    });
  }

  const loadTwikoo = (bool = false) => {
    if (typeof twikoo === 'object') {
      init()
      bool && $countDom && setTimeout(getCount,0)
    } else {
      getScript('https://cdn.jsdelivr.net/npm/twikoo@1.3.0/dist/twikoo.all.min.js').then(()=> {
        init()
        bool && $countDom && setTimeout(getCount,0)
      })
    }
  }

  if ('Twikoo' === 'Twikoo' || !true) {
    if (true) btf.loadComment(document.getElementById('twikoo-wrap'), loadTwikoo)
    else loadTwikoo(true)
  } else {
    window.loadOtherComment = () => {
      loadTwikoo()
    }
  }
})()</script></div><script defer src="//lib.baomitu.com/jquery/3.5.1/jquery.min.js"></script><script defer src="https://myhkw.cn/api/player/160561664166" id="myhk" key="160561664166" m="1"></script><div><canvas id="snow" style="position:fixed;top:0;left:0;width:100%;height:100%;z-index:99999;pointer-events:none"></canvas></div><script>const notMobile = (!(navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)));</script><scrip async type="text/javascript" src="https://cdn.jsdelivr.net/gh/Candinya/Kratos-Rebirth@latest/source/js/snow.min.js"></scrip><scrip defer src="https://cdn.jsdelivr.net/npm/hexo-theme-volantis@latest/source/js/issues.min.js"></scrip><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><script>var gitcalendar = new Vue({
  el: '#gitcalendar',
  data: {
    simplemode: true, 
    user: 'xiaoliblog',
    fixed: 'fixed',
    px: 'px',
    x: '',
    y: '',
    span1: '',
    span2: '',
    month: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
    monthchange: [],
    oneyearbeforeday: '',
    thisday: '',
    amonthago: '',
    aweekago: '',
    weekdatacore: 0,
    datacore: 0,
    total: 0,
    datadate: '',
    data: [],
    positionplusdata: [],
    firstweek: [],
    lastweek: [],
    beforeweek: [],
    thisweekdatacore: 0,
    mounthbeforeday: 0,
    mounthfirstindex: 0,
    crispedges: 'crispedges',
    thisdayindex: 0,
    amonthagoindex: 0,
    amonthagoweek: [],
    firstdate: [],
    first2date: [],
    montharrbefore: [],
    monthindex: 0,
    color: ['#ebedf0', '#f1f8ff', '#dbedff', '#c8e1ff', '#79b8ff', '#2188ff', '#0366d6', '#005cc5', '#044289', '#032f62', '#05264c']
  },
  methods: {
    selectStyle(data, event) {
      document.querySelector('.angle-wrapper').style.display = 'block'
      this.span1 = data.date;
      this.span2 = data.count;
      this.x = event.clientX - 100;
      this.y = event.clientY - 60
    },
    outStyle() {
      document.querySelector('.angle-wrapper').style.display = 'none'
    },
    thiscolor(x) {
      if (x === 0) {
        let i = parseInt(x / 2);
        return this.color[0]
      } else if (x < 2) {
        return this.color[1]
      } else if (x < 20) {
        let i = parseInt(x / 2);
        return this.color[i]
      } else {
        return this.color[9]
      }
    },
  }
});
var apiurl = 'python-github-calendar-api-ruby.vercel.app' ? 'https://python-github-calendar-api-ruby.vercel.app/api?' : 'https://githubapi.ryanchristian.dev/user/'
var githubapiurl = apiurl + gitcalendar.user;
//canvas绘图
function responsiveChart() {
  let c = document.getElementById("gitcanvas");
  if (c) {
    let cmessage = document.getElementById("gitmessage");
    let ctx = c.getContext("2d");
    c.width = document.getElementById("gitcalendarcanvasbox").offsetWidth;
    let linemaxwitdh = 0.96 * c.width / gitcalendar.data.length;
    c.height = 9 * linemaxwitdh;
    let lineminwitdh = 0.8 * linemaxwitdh;
    let setposition = {
      x: 0.02 * c.width,
      y: 0.025 * c.width
    };
    for (let week in gitcalendar.data) {
      weekdata = gitcalendar.data[week];
      for (let day in weekdata) {
        let dataitem = {
          date: "",
          count: "",
          x: 0,
          y: 0
        };
        gitcalendar.positionplusdata.push(dataitem);
        ctx.fillStyle = gitcalendar.thiscolor(weekdata[day].count);
        setposition.y = Math.round(setposition.y * 100) / 100;
        dataitem.date = weekdata[day].date;
        dataitem.count = weekdata[day].count;
        dataitem.x = setposition.x;
        dataitem.y = setposition.y;
        ctx.fillRect(setposition.x, setposition.y, lineminwitdh, lineminwitdh);
        setposition.y = setposition.y + linemaxwitdh
      };
      setposition.y = 0.025 * c.width;
      setposition.x = setposition.x + linemaxwitdh
    };
    ctx.font = "600  Arial";
    ctx.fillStyle = '#aaa';
    ctx.fillText("日", 0, 1.9 * linemaxwitdh);
    ctx.fillText("二", 0, 3.9 * linemaxwitdh);
    ctx.fillText("四", 0, 5.9 * linemaxwitdh);
    ctx.fillText("六", 0, 7.9 * linemaxwitdh);
    let monthindexlist = c.width / 24;
    for (let index in gitcalendar.monthchange) {
      ctx.fillText(gitcalendar.monthchange[index], monthindexlist, 0.7 * linemaxwitdh);
      monthindexlist = monthindexlist + c.width / 12
    };
    cmessage.onmousemove = function(event) {
      document.querySelector('.angle-wrapper').style.display = 'none'
    };
    c.onmousemove = function(event) {
      document.querySelector('.angle-wrapper').style.display = 'none'
      getMousePos(c, event);
    };

    function getMousePos(canvas, event) {
      var rect = canvas.getBoundingClientRect();
      var x = event.clientX - rect.left * (canvas.width / rect.width);
      var y = event.clientY - rect.top * (canvas.height / rect.height);
      //console.log("x:"+x+",y:"+y);
      for (let item of gitcalendar.positionplusdata) {
        let lenthx = x - item.x;
        let lenthy = y - item.y;
        //console.log(lenthx,lenthy);
        if (0 < lenthx && lenthx < lineminwitdh) {
          if (0 < lenthy && lenthy < lineminwitdh) {
            //console.log(item.date,item.count)
            document.querySelector('.angle-wrapper').style.display = 'block'
            gitcalendar.span1 = item.date;
            gitcalendar.span2 = item.count;
            gitcalendar.x = event.clientX - 100;
            gitcalendar.y = event.clientY - 60
          }
        }
        //if(0< x - item.x <lineminwitdh&&0< y - item.y <lineminwitdh){
        //console.log(item.count,item.date);
        //}
      }
    }
  }
}
//数据统计算法
function addlastmonth() {
  if (gitcalendar.thisdayindex === 0) {
    thisweekcore(52);
    thisweekcore(51);
    thisweekcore(50);
    thisweekcore(49);
    thisweekcore(48);
    gitcalendar.thisweekdatacore += gitcalendar.firstdate[6].count;
    gitcalendar.amonthago = gitcalendar.firstdate[6].date
  } else {
    thisweekcore(52);
    thisweekcore(51);
    thisweekcore(50);
    thisweekcore(49);
    thisweek2core();
    gitcalendar.amonthago = gitcalendar.first2date[gitcalendar.thisdayindex - 1].date
  }
};

function thisweek2core() {
  for (let i = gitcalendar.thisdayindex - 1; i < gitcalendar.first2date.length; i++) {
    gitcalendar.thisweekdatacore += gitcalendar.first2date[i].count
  }
};

function thisweekcore(index) {
  for (let item of gitcalendar.data[index]) {
    gitcalendar.thisweekdatacore += item.count
  }
};

function addlastweek() {
  for (let item of gitcalendar.lastweek) {
    gitcalendar.weekdatacore += item.count
  }
};

function addbeforeweek() {
  for (let i = gitcalendar.thisdayindex; i < gitcalendar.beforeweek.length; i++) {
    gitcalendar.weekdatacore += gitcalendar.beforeweek[i].count
  }
};

function addweek(data) {
  if (gitcalendar.thisdayindex === 6) {
    gitcalendar.aweekago = gitcalendar.lastweek[0].date;
    addlastweek()
  } else {
    lastweek = data.contributions[51];
    gitcalendar.aweekago = lastweek[gitcalendar.thisdayindex + 1].date;
    addlastweek();
    addbeforeweek()
  }
}

fetch(githubapiurl)
  .then(data => data.json())
  .then(data => {
    gitcalendar.data = data.contributions;
    gitcalendar.total = data.total;
    gitcalendar.first2date = gitcalendar.data[48];
    gitcalendar.firstdate = gitcalendar.data[47];
    gitcalendar.firstweek = data.contributions[0];
    gitcalendar.lastweek = data.contributions[52];
    gitcalendar.beforeweek = data.contributions[51];
    gitcalendar.thisdayindex = gitcalendar.lastweek.length - 1;
    gitcalendar.thisday = gitcalendar.lastweek[gitcalendar.thisdayindex].date;
    gitcalendar.oneyearbeforeday = gitcalendar.firstweek[0].date;
    gitcalendar.monthindex = gitcalendar.thisday.substring(5, 7) * 1;
    gitcalendar.montharrbefore = gitcalendar.month.splice(gitcalendar.monthindex, 12 - gitcalendar.monthindex);
    gitcalendar.monthchange = gitcalendar.montharrbefore.concat(gitcalendar.month);
    addweek(data);
    addlastmonth();
    responsiveChart();
  })
  .catch(function(error) {
    console.log(error);
  });

//手机版更换为svg绘制
if (document.getElementById("gitcalendarcanvasbox").offsetWidth < 500) {
  gitcalendar.simplemode = false
}

//当改变窗口大小时重新绘制canvas
window.onresize = function() {
  if (gitcalendar.simplemode) responsiveChart()
}

//解决滚动滑轮时出现的标签显示
window.onscroll = function() {
  if (document.querySelector('.angle-wrapper')) {
    document.querySelector('.angle-wrapper').style.display = 'none'
  }
};</script></div><script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","tagMode":false,"log":false,"model":{"jsonPath":"/live2dw/assets/hijiki.model.json"},"display":{"position":"right","width":150,"height":300},"mobile":{"show":true},"react":{"opacity":0.7}});</script></body></html>